//
//  ViewController.m
//  UI_03LTView
//
//  Created by dllo on 16/6/7.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import "LTView.h"
#import "LTLabel.h"
#import "LTTextField.h"



@interface ViewController ()

@property(nonatomic, retain) NSArray *labelArray;
@property(nonatomic,retain)NSArray *textArray;


@end

@implementation ViewController

-(void)dealloc {
    [_labelArray release];
    [_textArray release];
    [super dealloc];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    [self holdAllData];
    [self creatLtViews];

}

-(void)holdAllData{
    NSArray *labelArray = @[@"用户名", @"密码", @"确认密码", @"电话", @"邮箱"];
    NSArray *textArray = @[@"请输入用户名", @"请输入密码", @"再次输入密码", @"请输入电话", @"请输入邮箱"];
    self.labelArray = labelArray;
    self.textArray = textArray;
}


-(void)creatLtViews{
    
        for (int i = 0; i < 5; i ++) {
            LTView *ltView = [[LTView alloc]initWithFrame:CGRectMake(30, 40 + (50 + 30) * i, 260, 60) withLabelText:self.labelArray [i] withTextField:self.textArray[i]];

             [self.view addSubview:ltView];
             [ltView release];
        
    }
    
    
    
}






- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
